home *** CD-ROM | disk | FTP | other *** search
- Path: news.channel1.com!channel1!dspse.bedford
- Distribution: world
- Newsgroups: comp.lang.c++
- Subject: Passing numbers
- From: dspse.bedford@channel1.com (Dspse Bedford)
- Message-ID: <40.88695.1613@channel1.com>
- Date: Wed, 27 Mar 1996 06:28:00 -0640
- Organization: Channel 1(R) 617-864-0100 Info
-
- Lets say I have the following class and functions defined:
-
- class A{
- ...
- void func(long lvar);
- void func(int ivar);
- ....
- };
- I know that the compiler can not decide if
- A a;
- a.func(30);
-
- should match up with the int version of func or the long version of
- func. However, is there anyway I can tell the compiler which one to
- use as a default definition such that the above would always be mapped
- to my default definition. In other words, if an arguement, such as
- a number, causes an ambiguity use the default definition. Does anyone
- know how or why not?
-
- thank you
- Anastasios Maurudis
- anastasios@dspse.com
-
- ---
- * WR 1.32 # 331 * `:-| "Fascinating, Captain!" - Spock
-